This module contains part of a Fortran API to functions detailed in ISO/IEC 9945-1:1990 Portable Operating System Interface (POSIX) - Part 1: System Application Program Interface (API) [C Language].
The functions in this module are from sections 5.2: Working Directory, 5.3.3 Set File Creation Mask, 5.3.4 Link to a File, 5.4 Special File Creation and 5.5 File Removal.
Error handling is described in F90_UNIX_ERRNO. Note that for procedures with an optional ERRNO argument, if an error occurs and ERRNO is not present, the program will be terminated.
Possible error conditions include EACCES, ENAMETOOLONG, ENOTDIR and ENOENT (see F90_UNIX_ERRNO).
SUBROUTINE GETCWD(PATH,LENPATH,ERRNO)
CHARACTER*(*),OPTIONAL,INTENT(OUT) :: PATH
INTEGER,OPTIONAL,INTENT(OUT) :: LENPATH, ERRNO
If neither PATH nor LENPATH is present, error EINVAL is raised. If the path to current working directory cannot be searched, error EACCES is raised. If PATH is present and LENPATH is not present, and PATH is shorter than the current working directory name, error ERANGE is raised. (See F90_UNIX_ERRNO).
SUBROUTINE LINK(EXISTING,NEW,ERRNO)
CHARACTER*(*),INTENT(IN) :: EXISTING,NEW
INTEGER,OPTIONAL,INTENT(OUT) :: ERRNO
Possible errors include EACCES, EEXIST, EMLINK, ENAMETOOLONG, ENOENT, ENOSPC, ENOTDIR, EPERM, EROFS, EXDEV (see F90_UNIX_ERRNO).
SUBROUTINE MKDIR(PATH,MODE,ERRNO)
CHARACTER*(*),INTENT(IN) :: PATH
INTEGER(MODE_KIND),INTENT(IN) :: MODE
INTEGER,OPTIONAL,INTENT(OUT) :: ERRNO
Possible errors include EACCES, EEXIST, EMLINK, ENAMETOOLONG, ENOENT, ENOSPC, ENOTDIR, EROFS (see F90_UNIX_ERRNO).
SUBROUTINE MKFIFO(PATH,MODE,ERRNO)
CHARACTER*(*),INTENT(IN) :: PATH
INTEGER(MODE_KIND),INTENT(IN) :: MODE
INTEGER,OPTIONAL,INTENT(OUT) :: ERRNO
Possible errors include EACCES, EEXIST, ENAMETOOLONG, ENOENT, ENOSPC, ENOTDIR, EROFS (see F90_UNIX_ERRNO).
SUBROUTINE RENAME(OLD,NEW,ERRNO)
CHARACTER*(*),INTENT(IN) :: OLD
CHARACTER*(*),INTENT(IN) :: NEW
INTEGER,OPTIONAL,INTENT(OUT) :: ERRNO
Possible errors include EACCES, EBUSY, EEXIST, ENOTEMPTY, EINVAL, EISDIR, ENAMETOOLONG, EMLINK, ENOENT, ENOSPC, ENOTDIR, EROFS, EXDEV (see F90_UNIX_ERRNO).
Possible errors include EACCES, EBUSY, EEXIST, ENOTEMPTY, ENAMETOOLONG, ENOENT, ENOTDIR, EROFS (see F90_UNIX_ERRNO).
SUBROUTINE UMASK(CMASK,PMASK)
INTEGER(MODE_KIND),INTENT(IN) :: CMASK
INTEGER(MODE_KIND),OPTIONAL,INTENT(OUT) :: PMASK
SUBROUTINE UNLINK(PATH,ERRNO)
CHARACTER*(*),INTENT(IN) :: PATH
INTEGER,OPTIONAL,INTENT(OUT) :: ERRNO
Possible errors include EACCES, EBUSY, ENAMETOOLONG, ENOENT, ENOTDIR, EPERM, EROFS (see F90_UNIX_ERRNO).
© The Numerical Algorithms Group Ltd, Oxford UK. 2001